package com.luoyuanxiangvip.admin.controller;


import com.luoyuanxiangvip.admin.controller.support.BaseController;
import com.luoyuanxiangvip.core.entity.BizLogs;
import com.luoyuanxiangvip.core.service.IBizLogsService;
import com.luoyuanxiangvip.common.utils.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luoyuanxiang <p>luoyuanxiangvip.com</p>
 * @since 2019-06-26
 */
@RestController
@RequestMapping("/admin/logs")
@RequiresAuthentication
@Api(description = "访问日志管理")
public class BizLogsController extends BaseController<IBizLogsService, BizLogs, Long> {

    @ApiOperation(value = "日志条数查询")
    @GetMapping("/logsCount")
    public AjaxResult logsCount() {
        int count = getiService().count();
        return AjaxResult.success("日志条数查询成功", count);
    }

}
